using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Text;
using EnvDTE;

namespace Microsoft.WowAddonStudio.Tests.Common.Mocks
{
    /// <summary>
	/// Allows you to manipulate text as data in text buffers.
    /// </summary>
    internal class MockEditPoint : EditPoint
    {
        private readonly string source;
        private readonly TextPoint textPoint;
        private readonly List<string> lines = new List<string>();

		/// <summary>
		/// Initializes a new instance of the <see cref="MockEditPoint"/> class.
		/// </summary>
		/// <param name="dte">The DTE.</param>
		/// <param name="source">The source.</param>
		/// <param name="textPoint">The text point.</param>
        public MockEditPoint(DTE dte, string source, TextPoint textPoint)
        {
            DTE = dte;
            this.source = source;
            this.textPoint = textPoint;

            if (!string.IsNullOrEmpty(source))
                using (var reader = new StringReader(source))
                {
                    while (reader.Peek() > -1)
                        lines.Add(reader.ReadLine());
                }
        }

		/// <summary>
		/// Gets the text between the current location and the specified location in the buffer.
		/// </summary>
		/// <param name="PointOrCount">Required. Either a <see cref="T:EnvDTE.TextPoint"/> object or a number of characters.</param>
		/// <returns>
		/// A string of text located between the current location and the specified location in the buffer.
		/// </returns>
        public string GetText(object PointOrCount)
        {
            int line = textPoint.Line;
            int count = 1;
            var builder = new StringBuilder();
            bool simpleLine = true;
            if (PointOrCount is TextPoint)
            {
                line = (PointOrCount as TextPoint).Line;
                simpleLine = false;
            }
            using (var reader = new StringReader(source))
            {
                while (reader.Peek() > -1)
                {
                    if (count == line)
                    {
                        if (simpleLine)
                            return reader.ReadLine();
                        builder.AppendLine(reader.ReadLine());
                        return builder.ToString();
                    }
                    builder.AppendLine(reader.ReadLine());
                    count++;
                }
            }
            return string.Empty;
        }

        #region TextPoint Members

		/// <summary>
		/// Returns a value indicating whether the value of the given point object's <see cref="P:EnvDTE.EditPoint.AbsoluteCharOffset"/> is equal to that of the calling <see cref="T:EnvDTE.EditPoint"/> object.
		/// </summary>
		/// <param name="Point">Required. A <see cref="T:EnvDTE.TextPoint"/> object to compare to the calling <see cref="T:EnvDTE.EditPoint"/> point object.</param>
		/// <returns>
		/// true if <paramref name="Point"/> has the same <see cref="P:EnvDTE.TextPoint.AbsoluteCharOffset"/> property value as the calling <see cref="T:EnvDTE.EditPoint"/> point object; otherwise, false.
		/// </returns>
        public bool EqualTo(TextPoint Point)
        {
            throw new System.NotImplementedException();
        }

        #region EditPoint Members

		/// <summary>
		/// Returns a value indicating whether the value of the given point object's <see cref="P:EnvDTE.EditPoint.AbsoluteCharOffset"/> is equal to that of the calling <see cref="T:EnvDTE.EditPoint"/> object.
		/// </summary>
		/// <param name="Point">Required. A <see cref="T:EnvDTE.TextPoint"/> object to compare to the calling <see cref="T:EnvDTE.EditPoint"/> point object.</param>
		/// <returns>
		/// true if <paramref name="Point"/> has the same <see cref="P:EnvDTE.TextPoint.AbsoluteCharOffset"/> property value as the calling <see cref="T:EnvDTE.EditPoint"/> point object; otherwise, false.
		/// </returns>
        bool EditPoint.EqualTo(TextPoint Point)
        {
            throw new System.NotImplementedException();
        }

		/// <summary>
		/// Returns whether the value of the called <see cref="T:EnvDTE.EditPoint"/> object's <see cref="P:EnvDTE.EditPoint.AbsoluteCharOffset"/> is less than that of the given <see cref="T:EnvDTE.TextPoint"/> object.
		/// </summary>
		/// <param name="Point">Required. A <see cref="T:EnvDTE.TextPoint"/> to compare to the calling point object.</param>
		/// <returns>
		/// A Boolean value indicating true if <paramref name="Point"/> has a greater <see cref="P:EnvDTE.TextPoint.AbsoluteCharOffset"/> property value compared to the calling point object's <see cref="P:EnvDTE.EditPoint.AbsoluteCharOffset"/> property.
		/// </returns>
        bool EditPoint.LessThan(TextPoint Point)
        {
            throw new System.NotImplementedException();
        }

		/// <summary>
		/// Returns whether the value of the <see cref="T:EnvDTE.EditPoint"/> object's <see cref="P:EnvDTE.EditPoint.AbsoluteCharOffset"/> property is greater than that of the given <see cref="T:EnvDTE.TextPoint"/> object.
		/// </summary>
		/// <param name="Point">Required. A <see cref="T:EnvDTE.TextPoint"/> to compare to the calling point object.</param>
		/// <returns>
		/// true if <paramref name="Point"/> has a smaller <see cref="P:EnvDTE.TextPoint.AbsoluteCharOffset"/> property value compared to the calling <see cref="T:EnvDTE.EditPoint"/> object's <see cref="P:EnvDTE.EditPoint.AbsoluteCharOffset"/> property; otherwise, false.
		/// </returns>
        bool EditPoint.GreaterThan(TextPoint Point)
        {
            throw new System.NotImplementedException();
        }

		/// <summary>
		/// Returns whether the value of the called <see cref="T:EnvDTE.EditPoint"/> object's <see cref="P:EnvDTE.EditPoint.AbsoluteCharOffset"/> is less than that of the given <see cref="T:EnvDTE.TextPoint"/> object.
		/// </summary>
		/// <param name="Point">Required. A <see cref="T:EnvDTE.TextPoint"/> to compare to the calling point object.</param>
		/// <returns>
		/// A Boolean value indicating true if <paramref name="Point"/> has a greater <see cref="P:EnvDTE.TextPoint.AbsoluteCharOffset"/> property value compared to the calling point object's <see cref="P:EnvDTE.EditPoint.AbsoluteCharOffset"/> property.
		/// </returns>
        public bool LessThan(TextPoint Point)
        {
            throw new System.NotImplementedException();
        }

		/// <summary>
		/// Returns whether the value of the <see cref="T:EnvDTE.EditPoint"/> object's <see cref="P:EnvDTE.EditPoint.AbsoluteCharOffset"/> property is greater than that of the given <see cref="T:EnvDTE.TextPoint"/> object.
		/// </summary>
		/// <param name="Point">Required. A <see cref="T:EnvDTE.TextPoint"/> to compare to the calling point object.</param>
		/// <returns>
		/// true if <paramref name="Point"/> has a smaller <see cref="P:EnvDTE.TextPoint.AbsoluteCharOffset"/> property value compared to the calling <see cref="T:EnvDTE.EditPoint"/> object's <see cref="P:EnvDTE.EditPoint.AbsoluteCharOffset"/> property; otherwise, false.
		/// </returns>
        public bool GreaterThan(TextPoint Point)
        {
            throw new System.NotImplementedException();
        }

		/// <summary>
		/// Attempts to display the text point's location.
		/// </summary>
		/// <param name="How">Optional. A <see cref="T:EnvDTE.vsPaneShowHow"/> constant that determines how the code is displayed.</param>
		/// <param name="PointOrCount">Optional. The endpoint of the selected range of text to be displayed. It can be either a <see cref="T:EnvDTE.TextPoint"/> or an integer.</param>
		/// <returns>
		/// true if the span of text fits within the current code editor; otherwise, false.
		/// </returns>
        bool EditPoint.TryToShow(vsPaneShowHow How, object PointOrCount)
        {
            throw new System.NotImplementedException();
        }

		/// <summary>
		/// Creates and returns an <see cref="T:EnvDTE.EditPoint"/> object at the location of the calling object.
		/// </summary>
		/// <returns>
		/// A <see cref="T:EnvDTE.EditPoint"/> object.
		/// </returns>
        EditPoint EditPoint.CreateEditPoint()
        {
            throw new System.NotImplementedException();
        }

		/// <summary>
		/// Moves the edit point the specified number of characters to the left.
		/// </summary>
		/// <param name="Count">Optional. The number of characters to move to the left. The default is 1 character.</param>
        public void CharLeft(int Count)
        {
            throw new System.NotImplementedException();
        }

		/// <summary>
		/// Moves the edit point the specified number of characters to the right.
		/// </summary>
		/// <param name="Count">Optional. The number of characters to move to the right. The default is one character.</param>
        public void CharRight(int Count)
        {
            throw new System.NotImplementedException();
        }

		/// <summary>
		/// Attempts to display the text point's location.
		/// </summary>
		/// <param name="How">Optional. A <see cref="T:EnvDTE.vsPaneShowHow"/> constant that determines how the code is displayed.</param>
		/// <param name="PointOrCount">Optional. The endpoint of the selected range of text to be displayed. It can be either a <see cref="T:EnvDTE.TextPoint"/> or an integer.</param>
		/// <returns>
		/// true if the span of text fits within the current code editor; otherwise, false.
		/// </returns>
        public bool TryToShow(vsPaneShowHow How, object PointOrCount)
        {
            throw new System.NotImplementedException();
        }

		/// <summary>
		/// Creates and returns an <see cref="T:EnvDTE.EditPoint"/> object at the location of the calling object.
		/// </summary>
		/// <returns>
		/// A <see cref="T:EnvDTE.EditPoint"/> object.
		/// </returns>
        public EditPoint CreateEditPoint()
        {
            throw new System.NotImplementedException();
        }

		/// <summary>
		/// Moves the edit point to the end of the current line in the buffer.
		/// </summary>
        public void EndOfLine()
        {
            throw new System.NotImplementedException();
        }

		/// <summary>
		/// Moves the edit point to the beginning of the current line in the buffer.
		/// </summary>
        public void StartOfLine()
        {
            throw new System.NotImplementedException();
        }

		/// <summary>
		/// Moves the edit point to the end of the document.
		/// </summary>
        public void EndOfDocument()
        {
            throw new System.NotImplementedException();
        }

		/// <summary>
		/// Moves the object to the beginning of the document.
		/// </summary>
        public void StartOfDocument()
        {
            throw new System.NotImplementedException();
        }

		/// <summary>
		/// Moves the object the specified number of words to the left.
		/// </summary>
		/// <param name="Count">Optional. Specifies how many words to move the edit point to the left of its current position in the buffer.</param>
        public void WordLeft(int Count)
        {
            throw new System.NotImplementedException();
        }

		/// <summary>
		/// Moves the object the specified number of words to the right.
		/// </summary>
		/// <param name="Count">Optional. The number of words to move the edit point to the right of its current position in the buffer.</param>
        public void WordRight(int Count)
        {
            throw new System.NotImplementedException();
        }

		/// <summary>
		/// Moves the edit point up the specified number of lines.
		/// </summary>
		/// <param name="Count">Optional. The number of lines to move the edit point. The default is 1.</param>
        public void LineUp(int Count)
        {
            throw new System.NotImplementedException();
        }

		/// <summary>
		/// Moves the edit point down the specified number of lines.
		/// </summary>
		/// <param name="Count">Optional. The number of lines to move the edit point. The default is 1.</param>
        public void LineDown(int Count)
        {
            throw new System.NotImplementedException();
        }

		/// <summary>
		/// Moves the active point to the given position.
		/// </summary>
		/// <param name="Point">Required. A <see cref="T:EnvDTE.TextPoint"/> object representing the location in which to move the character.</param>
        public void MoveToPoint(TextPoint Point)
        {
            throw new System.NotImplementedException();
        }

		/// <summary>
		/// Moves the document to the specified line and character offset position in that line.
		/// </summary>
		/// <param name="line">Required. The line number, starting at one. <paramref name="line"/> may also be one of the constants from <see cref="T:EnvDTE.vsGoToLineOptions"/>.</param>
		/// <param name="Offset">Required. The character index position in the line, starting at one.</param>
        public void MoveToLineAndOffset(int line, int Offset)
        {
            throw new System.NotImplementedException();
        }

		/// <summary>
		/// Moves the active point to the given 1-based absolute character offset.
		/// </summary>
		/// <param name="Offset">Required. A character index from the start of the document, beginning at one.</param>
        public void MoveToAbsoluteOffset(int Offset)
        {
            throw new System.NotImplementedException();
        }

		/// <summary>
		/// Sets an unnamed bookmark on the current line in the buffer.
		/// </summary>
        public void SetBookmark()
        {
            throw new System.NotImplementedException();
        }

		/// <summary>
		/// Clears any unnamed bookmarks in the current text buffer line.
		/// </summary>
        public void ClearBookmark()
        {
            throw new System.NotImplementedException();
        }

		/// <summary>
		/// Moves to the location of the next bookmark in the document.
		/// </summary>
		/// <returns>
		/// true if the insertion point moves to the next bookmark; otherwise, false.
		/// </returns>
        public bool NextBookmark()
        {
            throw new System.NotImplementedException();
        }

		/// <summary>
		/// Moves the edit point to the location of the previous bookmark in the document.
		/// </summary>
		/// <returns>
		/// A Boolean value indicating true if the edit point moves to a previous bookmark, false if not.
		/// </returns>
        public bool PreviousBookmark()
        {
            throw new System.NotImplementedException();
        }

		/// <summary>
		/// Fills the current line in the buffer with empty characters (white space) to the given column.
		/// </summary>
		/// <param name="Column">Required. The number of columns to pad, starting at one.</param>
        public void PadToColumn(int Column)
        {
            throw new System.NotImplementedException();
        }

		/// <summary>
		/// Inserts the given string at the edit point's current position in the buffer.
		/// </summary>
		/// <param name="Text">Required. The text to insert into the text buffer. Must be a Unicode string.</param>
        public void Insert(string Text)
        {
            throw new System.NotImplementedException();
        }

		/// <summary>
		/// Inserts the contents of the specified file at the current location in the buffer.
		/// </summary>
		/// <param name="File">Required. The name of the file to insert into the text buffer.</param>
        public void InsertFromFile(string File)
        {
            throw new System.NotImplementedException();
        }

		/// <summary>
		/// Gets a string representing the text between two given lines.
		/// </summary>
		/// <param name="Start">Optional. The last line number to include the text.</param>
		/// <param name="ExclusiveEnd">Required. The first line number to include the text.</param>
		/// <returns>The text between two given lines.</returns>
        public string GetLines(int Start, int ExclusiveEnd)
        {
            throw new System.NotImplementedException();
        }

		/// <summary>
		/// Copies the specified range of text to the clipboard.
		/// </summary>
		/// <param name="PointOrCount">Required. Either a <see cref="T:EnvDTE.TextPoint"/> object or a number of characters.</param>
		/// <param name="Append">Optional. Indicates whether to append the selected text to the clipboard. The default is false.</param>
        public void Copy(object PointOrCount, bool Append)
        {
            throw new System.NotImplementedException();
        }

		/// <summary>
		/// Copies the specified range of text to the clipboard and deletes it from the document.
		/// </summary>
		/// <param name="PointOrCount">Required. Either a <see cref="T:EnvDTE.TextPoint"/> object or a number of characters.</param>
		/// <param name="Append">Optional. Indicates whether to append the selected text to the clipboard. The default is false.</param>
        public void Cut(object PointOrCount, bool Append)
        {
            throw new System.NotImplementedException();
        }

		/// <summary>
		/// Deletes the specified range of text.
		/// </summary>
		/// <param name="PointOrCount">Required. Represents either a <see cref="T:EnvDTE.TextPoint"/> object or a number of characters.</param>
        public void Delete(object PointOrCount)
        {
            throw new System.NotImplementedException();
        }

		/// <summary>
		/// Inserts the clipboard contents at the current location.
		/// </summary>
        public void Paste()
        {
            throw new System.NotImplementedException();
        }

		/// <summary>
		/// Returns a value indicating whether any of the specified range contains read-only text.
		/// </summary>
		/// <param name="PointOrCount">Required. Either a <see cref="T:EnvDTE.TextPoint"/> object or a number of characters.</param>
		/// <returns>
		/// true if the selection contains read-only text; otherwise, false.
		/// </returns>
        public bool ReadOnly(object PointOrCount)
        {
            throw new System.NotImplementedException();
        }

		/// <summary>
		/// Finds a given matching pattern in the selected text.
		/// </summary>
		/// <param name="Pattern">Required. The text you want to find.</param>
		/// <param name="vsFindOptionsValue">Optional. A <see cref="T:EnvDTE.vsFindOptions"/> constant indicating the type of search to perform. The <see cref="F:EnvDTE.vsFindOptions.vsFindOptionsMatchInHiddenText"/> constant value does not apply to this method because <see cref="M:EnvDTE.EditPoint.FindPattern(System.String,System.Int32,EnvDTE.EditPoint@,EnvDTE.TextRanges@)"/> searches all text, including hidden text.</param>
		/// <param name="EndPoint">Optional. An <see cref="T:EnvDTE.EditPoint"/> object representing the point that is to be moved to the end of the matched pattern.</param>
		/// <param name="Tags">Optional. If the matched pattern is a regular expression containing tagged subexpressions, then the <paramref name="Tags"/> argument contains a collection of <see cref="T:EnvDTE.TextRange"/> objects, one for each tagged subexpression.</param>
		/// <returns>
		/// true if the pattern is found; otherwise, false.
		/// </returns>
        public bool FindPattern(string Pattern, int vsFindOptionsValue, ref EditPoint EndPoint, ref TextRanges Tags)
        {
            throw new System.NotImplementedException();
        }

		/// <summary>
		/// Finds a pattern in the specified range of text and replaces it with the specified text.
		/// </summary>
		/// <param name="Point">Required. The endpoint of the specified range of text. The edit point and <paramref name="Point"/> are the boundaries for replacement.</param>
		/// <param name="Pattern">Required. The string to find.</param>
		/// <param name="Replace">Required. The replacement string for <paramref name="Pattern"/>.</param>
		/// <param name="vsFindOptionsValue">Optional. A <see cref="T:EnvDTE.vsFindOptions"/> constant indicating the type of search to perform.</param>
		/// <param name="Tags">Optional. If the matched pattern is a regular expression containing tagged sub-expressions, then <paramref name="Tags"/> contains a collection of <see cref="T:EnvDTE.TextRange"/> objects, one for each tagged subexpression.</param>
		/// <returns>
		/// true if replacement occurs successfully; otherwise, false.
		/// </returns>
        public bool ReplacePattern(TextPoint Point, string Pattern, string Replace, int vsFindOptionsValue,
                                   ref TextRanges Tags)
        {
            throw new System.NotImplementedException();
        }

		/// <summary>
		/// Indents the selected lines by the given number of indentation levels.
		/// </summary>
		/// <param name="Point">Optional. A <see cref="T:EnvDTE.TextPoint"/> object endpoint for indentation. The default is the current line in the buffer, causing the current line in the buffer to be indented.</param>
		/// <param name="Count">Optional. The number of displayed columns to indent the lines. The default value is 1.</param>
        public void Indent(TextPoint Point, int Count)
        {
            throw new System.NotImplementedException();
        }

		/// <summary>
		/// Removes the indent characters from the selected lines by the given number of indentation levels.
		/// </summary>
		/// <param name="Point">Optional. The endpoint. Defaults to the endpoint, causing the current line in the buffer to be outdented. The default value is one indentation level.</param>
		/// <param name="Count">Optional. The number of display columns to indent each line. The default is 1.</param>
        public void Unindent(TextPoint Point, int Count)
        {
            throw new System.NotImplementedException();
        }

		/// <summary>
		/// Formats the specified range of text based on the current language.
		/// </summary>
		/// <param name="Point">Required. A <see cref="T:EnvDTE.TextPoint"/> object representing the end of the specified range of text.</param>
        public void SmartFormat(TextPoint Point)
        {
            throw new System.NotImplementedException();
        }

		/// <summary>
		/// Creates an outlining section based on an edit point and the given text point or value.
		/// </summary>
		/// <param name="PointOrCount">Required. Either a <see cref="T:EnvDTE.TextPoint"/> object or an integer representing the number of characters.</param>
        public void OutlineSection(object PointOrCount)
        {
            throw new System.NotImplementedException();
        }

		/// <summary>
		/// Replaces the selected text with the given text.
		/// </summary>
		/// <param name="PointOrCount">Required. Either a <see cref="T:EnvDTE.TextPoint"/> object or an integer that determines the text to replace.</param>
		/// <param name="Text">Required. The text to insert.</param>
		/// <param name="Flags">Required. A <see cref="T:EnvDTE.vsEPReplaceTextOptions"/> constant representing an editor action.</param>
        public void ReplaceText(object PointOrCount, string Text, int Flags)
        {
            Trace.WriteLine(string.Format("MockEditPoint::ReplaceText(PointOrCount: {0} Text: {1} Flags: {2})",
                                          PointOrCount, Text, Flags));
        }

		/// <summary>
		/// Changes the case of the selected text.
		/// </summary>
		/// <param name="PointOrCount">Required. Either a <see cref="T:EnvDTE.TextPoint"/> object or a number of characters.</param>
		/// <param name="How">Required. A <see cref="T:EnvDTE.vsCaseOptions"/> constant indicating the case of the text.</param>
        public void ChangeCase(object PointOrCount, vsCaseOptions How)
        {
            throw new System.NotImplementedException();
        }

		/// <summary>
		/// Deletes the empty characters (white space) horizontally or vertically around the current location in the text buffer.
		/// </summary>
		/// <param name="Direction">Optional. A <see cref="T:EnvDTE.vsWhitespaceOptions"/> constant that determines how and where to remove empty spaces.</param>
        public void DeleteWhitespace(vsWhitespaceOptions Direction)
        {
            throw new System.NotImplementedException();
        }

		/// <summary>
		/// Gets the top-level extensibility object.
		/// </summary>
		/// <value></value>
		/// <returns>A <see cref="T:EnvDTE.DTE"/> object.</returns>
        DTE EditPoint.DTE
        {
            get { throw new System.NotImplementedException(); }
        }

        #endregion

		/// <summary>
		/// Gets the top-level extensibility object.
		/// </summary>
		/// <value></value>
		/// <returns>A <see cref="T:EnvDTE.DTE"/> object.</returns>
        public DTE DTE { get; private set; }

		/// <summary>
		/// Gets the immediate parent object of the <see cref="T:EnvDTE.EditPoint"/> object.
		/// </summary>
		/// <value></value>
		/// <returns>A <see cref="T:EnvDTE.TextDocument"/> object.</returns>
        TextDocument EditPoint.Parent
        {
            get { throw new System.NotImplementedException(); }
        }

		/// <summary>
		/// Gets the <see cref="T:EnvDTE.EditPoint"/> object's line number.
		/// </summary>
		/// <value></value>
		/// <returns>The line number of the <see cref="T:EnvDTE.EditPoint"/> object.</returns>
        int EditPoint.Line
        {
            get { throw new System.NotImplementedException(); }
        }

		/// <summary>
		/// Gets the immediate parent object of the <see cref="T:EnvDTE.EditPoint"/> object.
		/// </summary>
		/// <value></value>
		/// <returns>A <see cref="T:EnvDTE.TextDocument"/> object.</returns>
        public TextDocument Parent
        {
            get { throw new System.NotImplementedException(); }
        }

		/// <summary>
		/// Gets the <see cref="T:EnvDTE.EditPoint"/> object's line number.
		/// </summary>
		/// <value></value>
		/// <returns>The line number of the <see cref="T:EnvDTE.EditPoint"/> object.</returns>
        public int Line
        {
            get { throw new System.NotImplementedException(); }
        }

		/// <summary>
		/// Gets the character offset of the <see cref="T:EnvDTE.EditPoint"/> object.
		/// </summary>
		/// <value></value>
		/// <returns>An integer value indicating the character offset of the <see cref="T:EnvDTE.EditPoint"/> object.</returns>
        int EditPoint.LineCharOffset
        {
            get { throw new System.NotImplementedException(); }
        }

		/// <summary>
		/// Gets the one-based character offset of the <see cref="T:EnvDTE.EditPoint"/> object.
		/// </summary>
		/// <value></value>
		/// <returns>The one-based character offset from the beginning of the document to the <see cref="T:EnvDTE.EditPoint"/> object.</returns>
        int EditPoint.AbsoluteCharOffset
        {
            get { throw new System.NotImplementedException(); }
        }

		/// <summary>
		/// Gets the character offset of the <see cref="T:EnvDTE.EditPoint"/> object.
		/// </summary>
		/// <value></value>
		/// <returns>An integer value indicating the character offset of the <see cref="T:EnvDTE.EditPoint"/> object.</returns>
        public int LineCharOffset
        {
            get { throw new System.NotImplementedException(); }
        }

		/// <summary>
		/// Gets the one-based character offset of the <see cref="T:EnvDTE.EditPoint"/> object.
		/// </summary>
		/// <value></value>
		/// <returns>The one-based character offset from the beginning of the document to the <see cref="T:EnvDTE.EditPoint"/> object.</returns>
        public int AbsoluteCharOffset
        {
            get { throw new System.NotImplementedException(); }
        }

		/// <summary>
		/// Gets the number of the column number of the <see cref="T:EnvDTE.EditPoint"/> object.
		/// </summary>
		/// <value></value>
		/// <returns>The number of the currently displayed column containing the <see cref="T:EnvDTE.EditPoint"/> object.</returns>
        int EditPoint.DisplayColumn
        {
            get { throw new System.NotImplementedException(); }
        }

		/// <summary>
		/// Gets a value indicating whether or not the object is at the end of the document.
		/// </summary>
		/// <value></value>
		/// <returns>true if you are at the end of the document; otherwise, false.</returns>
        bool EditPoint.AtEndOfDocument
        {
            get { throw new System.NotImplementedException(); }
        }

		/// <summary>
		/// Gets the number of the column number of the <see cref="T:EnvDTE.EditPoint"/> object.
		/// </summary>
		/// <value></value>
		/// <returns>The number of the currently displayed column containing the <see cref="T:EnvDTE.EditPoint"/> object.</returns>
        public int DisplayColumn
        {
            get { throw new System.NotImplementedException(); }
        }

		/// <summary>
		/// Gets a value indicating whether or not the object is at the end of the document.
		/// </summary>
		/// <value></value>
		/// <returns>true if you are at the end of the document; otherwise, false.</returns>
        public bool AtEndOfDocument
        {
            get { throw new System.NotImplementedException(); }
        }

		/// <summary>
		/// Gets a value indicating whether or not the object is at the beginning of the document.
		/// </summary>
		/// <value></value>
		/// <returns>true if you are at the start of a document; otherwise, false.</returns>
        bool EditPoint.AtStartOfDocument
        {
            get { throw new System.NotImplementedException(); }
        }

		/// <summary>
		/// Gets a value indicating whether or not the object is at the end of a line.
		/// </summary>
		/// <value></value>
		/// <returns>true if you are at the end of a line; otherwise, false.</returns>
        bool EditPoint.AtEndOfLine
        {
            get { return AtEndOfLine; }
        }

		/// <summary>
		/// Gets a value indicating whether or not the object is at the beginning of the document.
		/// </summary>
		/// <value></value>
		/// <returns>true if you are at the start of a document; otherwise, false.</returns>
        public bool AtStartOfDocument
        {
            get { throw new System.NotImplementedException(); }
        }

		/// <summary>
		/// Gets a value indicating whether or not the object is at the end of a line.
		/// </summary>
		/// <value></value>
		/// <returns>true if you are at the end of a line; otherwise, false.</returns>
        public bool AtEndOfLine
        {
            get
            {
                var parent = (TextDocument) DTE.ActiveDocument.Object("TextDocument");
                return (parent.EndPoint.Line == textPoint.Line
                        && parent.EndPoint.LineCharOffset == textPoint.DisplayColumn);
            }
        }

		/// <summary>
		/// Gets a value indicating whether or not the <see cref="T:EnvDTE.EditPoint"/> object is at the beginning of a line.
		/// </summary>
		/// <value></value>
		/// <returns>true if you are at the start of a line; otherwise, False if otherwise.</returns>
        bool EditPoint.AtStartOfLine
        {
            get { throw new System.NotImplementedException(); }
        }

		/// <summary>
		/// Gets a value indicating whether or not the <see cref="T:EnvDTE.EditPoint"/> object is at the beginning of a line.
		/// </summary>
		/// <value></value>
		/// <returns>true if you are at the start of a line; otherwise, False if otherwise.</returns>
        public bool AtStartOfLine
        {
            get { throw new System.NotImplementedException(); }
        }

		/// <summary>
		/// Get_s the code element.
		/// </summary>
		/// <param name="Scope">The scope.</param>
		/// <returns></returns>
        CodeElement EditPoint.get_CodeElement(vsCMElement Scope)
        {
            throw new System.NotImplementedException();
        }

		/// <summary>
		/// Gets the number of characters in a line.
		/// </summary>
		/// <value></value>
		/// <returns>The number of characters in a line containing the <see cref="T:EnvDTE.EditPoint"/> object, excluding the new line character.</returns>
        public int LineLength
        {
            get { return lines[textPoint.Line - 1].Length; }
        }

		/// <summary>
		/// Get_s the code element.
		/// </summary>
		/// <param name="Scope">The scope.</param>
		/// <returns></returns>
        public CodeElement get_CodeElement(vsCMElement Scope)
        {
            throw new System.NotImplementedException();
        }

        #endregion
    }
}